﻿using UnityEngine;
using System.Collections;
using ProtoBuf.Message;
using System.Collections.Generic;

namespace UI
{
    public class UIUnionData
    {
        public enum RoleType
        {
            COMMON=0,
            VICE_CHAIRMAN=1,
            CHAIRMAN=2,
        }

        public string name;
        public int level;
        public int badge;
        public long coin;

        public int activeScore;
        public string notice;
        public int currentExp;
        public RoleType roleType;
        public int hasUnion;
        public int curStage;//公会战当前状态
        public List<string> unionFightItem = new List<string>();
        public List<GameObject> userItems;
        public List<string> firstItems = new List<string>();
        public List<string> secondItems = new List<string>();
        //public List<int> resetItems = new List<int>();

        public void SetData(SCGetUnionInfo info)
        {
            if (info.hasUnion == BOOL.TRUE)
            {
                this.activeScore = info.activeScore;
                this.badge = info.badgeNum;
                this.coin = info.coinNum;
                this.currentExp = info.currentExp;
                this.notice = info.notice;
                this.roleType = (RoleType)info.myRole;
                this.hasUnion = info.hasUnion;
            }
        }    
    }
}